@import "./var.scss";

.shopping-cart,
.shopping-cart-order{
    margin-bottom: 10px;
    .content{
        min-height: 400px;
        padding: 15px 0;
        background-color: #fff;
        box-shadow: 0 0 5px rgb(0,0,0,10%);
    }
    .top{
        padding: 10px 20px;
        overflow: hidden;
        &>span{
            &:nth-child(1){
                line-height: 32px;
                color: $priceColor;
            }
            &.btn{
                float: right;
            }
        }
    }
    .thead{
        position: relative;
        min-height: 10px;
        line-height: 30px;
        &>span{
            margin-right: 10px;
            &:nth-child(1){
                padding: 4px 8px;
                color: #fff;
                background-color: #ff7802;
            }
            &:nth-child(2){
                font-size: 16px;
            }
            &:nth-child(3){
                color: $priceColor;
            }
        }
        &>em{
            position: absolute;
            right: 0;
            top: -2px;
            padding: 0 0 0 10px;
            background-color: #fff;
            color: #666;
            span{
                color: $priceColor;
                font-size: 12px;
                &:last-child{
                    font-size: 20px;
                }
            }
        }
    }
    .table-body{
        .part{
            margin-bottom: 30px;
        }
        .tr{
            height: 115px;
            padding: 14px 20px;
            border: 1px solid #eee;
            &>div{
                height: 100%;
                vertical-align: top;
            }
            &+.tr{
                border-top: none;
            }
            &:hover{
                outline: 1px solid $mainColor;
            }
        }
        .tr>.product{
            position: relative;
            padding: 2px 15px 0 130px;
            img{
                position: absolute;
                left: 0;
                top: 0;
                width: 120px;
                height: 100%;
            }
            .product-info{
                a{
                    display: inline-block;
                    max-height: 45px;
                    line-height: 1.4;
                    font-size: 16px;
                    color: #222;
                    overflow: hidden;
                    &:hover{
                        color: $priceColor;
                    }
                }   
                p{
                    margin-top: 5px;
                    color: #777;
                }
                span{
                    &+span{
                        margin-left: 10px;
                    }
                }
            }
        }
    }
    .table-order{
        height: 54px;
        text-align: right;
        background-color: #f4f4f4;
        .title,
        .price,
        .amount,
        button {
          display: inline-block;
          float: right;
        }
        .price,
        button {
          height: 54px;
          line-height: 52px;
        }
        .title,
        .amount {
          margin-top: 21px;
          font-size: 16px;
        }
        .price {
          margin-right: 10px;
          font-size: 40px;
          color: $priceColor;
          em {
            font-size: 20px;
          }
        }
        .amount {
          color: #333;
          em{
            margin: 0 3px;
            color: $priceColor;
            font-weight: bold;
          }
        }
        button {
          width: 250px;
          color: #fff;
          border: 1px solid #db4300;
          background: linear-gradient(0deg, $priceColor, #d5500d);
          font-size: 20px;
          padding: 0 20px;
          border-radius: 4px;
          &:hover {
            cursor: pointer;
            opacity: 0.8;
          }
          &[disabled]{
            cursor: not-allowed;
            background: #bbb;
            border-color: #bbb;
          }
        }
    }
}

// 购物车
.shopping-cart{
    .empty{
        padding: 50px 0 70px;
        text-align: center;
        &>p{
            margin-bottom: 15px;
            color: #aaa;
        }
        &>div{
            margin: 10px 0;
            color: #555;
            font-size: 16px;
        }
        &>button{
            border-color: $mainColor;
            color: $mainColor;
            &:hover{
                border-color: #ddd;
            }
        }
    }
    .table-title,
    .table-body .tr{
        & > div {
            font-size: 14px;
            display: inline-block;
        }
        &>.check{
            width: 100px;
            label{
                margin-right: 5px;
                vertical-align: 1px;
            }
        }
        &>.product{
            width: 445px;
        }
        &>.usedate{
            width: 180px;
        }
        &>.price{
            width: 110px;
        }
        &>.number{
            width: 120px;
        }
        &>.total{
            width: 110px;
        }
        &>.operate{
            width: 70px;
        }
    }
    .table-title{
        padding: 14px 20px;
        background-color: #f6f6f6;
        font-size: 0;
        & > div {
          color: #777;
        }
    }
    .table-body{
        padding: 0;
        .part{
            padding: 20px 20px 0;
            &+.part{
                padding-top: 20px;
                border-top: 10px solid #f8f8f8;
            }
        }
        .tr{
            position: relative;
            &>.check{
                width: 50px;
            }
            &>.product{
                width: 475px;
            }
            &>.usedate,
            &>.price,
            &>.number,
            &>.total,
            &>.operate{
                position: relative;
                &>*{
                    position: absolute;
                    left: 0;
                    top: 50%;
                    transform: translateY(-50%);
                }
            }
            &.outdate::after{
                content: "已过期";
                display: block;
                position: absolute;
                z-index: 101;
                top: 0;
                right: 0;
                padding: 2px 10px;
                font-size: 12px;
                color: #fff;
                text-align: center;
                border-radius: 0 0 0 8px;
                background: #ccc;
            }
        }
        .tr>.check{
            position: relative;
            label{
                position: absolute;
                top: 50%;
                margin-top: -10px;
            }
        }
        .tr>.usedate{
            p{
                color: #777;
                font-size: 12px;
            }
            span{
                color: #222;
                font-size: 14px;
            }
        }
        .tr>.number{
            &>div{
                width: 70px;
            }
        }
        .tr>.operate{
            span{
                color: #999;
                font-size: 12px;
                &:hover{
                    cursor: pointer;
                    color: #e2231a;
                }
            }
        }
        .tr>.price,
        .tr>.total{
            font-size: 12px;
            span{
                font-size: 18px;
            }
        }
        .tr>.price{
            &>div{
                text-align: center;
            }
            em{
                display: inline-block;
                padding: 0 5px;
                color: #fff;
                background-color: #ff7802;
            }
        }
        .tr>.total{
            color: $priceColor;
            font-weight: bold;
        }
    }
    .tips{
        padding: 10px 20px 0;
        text-align: right;
        color: #999;
        font-size: 12px;
        span{
            margin-right: 3px;
            color: $mainColor;
        }
    }
}
// 购物车下单
.shopping-cart-order{
    .content{
        padding-bottom: 0;
    }
    .top{
        padding: 10px 30px;
        border-bottom: 1px dashed #eee;
        font-size: 16px;
    }
    .thead{
        margin-bottom: 3px;
    }
    .table-body{
        padding: 0 30px;
        margin-top: 20px;
        .part{
            padding: 0;
        }
        .tr{
            height: auto;
            &>div{
                display: inline-block;
            }
            &>.product{
                height: 95px;
                width: 880px;
                padding-left: 135px;
                img{
                    width: 125px;
                }
            }
            &>.info{
                width: 218px;
                text-align: right;
                p{
                    color: #888;
                    i{
                        font-size: 14px;
                    }
                    span, em{
                        color: #333;
                        font-size: 16px;
                    }
                    &.date{
                        line-height: 20px;
                    }
                    &.num{
                        span{
                            font-size: 12px;
                        }
                        em{
                            font-size: 16px;
                        }
                    }
                    &.total{
                        span, em{
                            color: $priceColor;
                        }
                        em{
                            font-size: 20px;
                        }
                    }
                }
            }
            &>.detail{
                display: block;
                margin-top: 15px;
                padding-top: 10px;
                border-top: 1px dashed #eee;
                &.detail-tourist{
                    .tips,
                    .tourist{
                        display: table-cell;
                        vertical-align: top;
                    }
                    .tips{
                        width: 500px;
                    }
                    .tourist{
                        width: 595px;
                    }
                }
            }
            .tips{
                padding: 8px 15px;
                color: #666;
                background-color: #f7f7f7;
                h5{
                    margin-bottom: 2px;
                    &>span{
                        color: $mainColor;
                    }
                }
            }
            .tourist{
                padding: 0 15px 0 30px;
                .t-tips{
                    margin-bottom: 5px;
                    color: #999;
                    font-size: 12px;
                    &>em{
                        color: $priceColor;
                    }
                }
            }
            .t-tourist{
                padding-top: 3px;
            }
            .thead{
                width: 100%;
                margin: 3px 0 0;
                color: #333;
            }
            .thead div,
            .tbody dd{
                display: table-cell;
                width: 150px;
                &:first-child{
                    width: 100px;
                }
                &:nth-child(2){
                    width: 180px;
                }
                &:last-child{
                    width: auto;
                }
            }
            .tbody{
                &>p{
                    color: #999;
                }
                dl {
                    margin-bottom: 0;
                }
                dd {
                    padding: 0 0 6px 0;
                    color: #777;
                    & > span {
                        font-size: 16px;
                        color: #999;
                        &:hover {
                        color: $mainColor;
                        cursor: pointer;
                        }
                    }
                }
            }
        }
    }
    .table-order{
        background-color: #e1e1e1;
        .amount {
            margin-right: 10px;
            color: #999;
        }
        .price{
            margin-right: 0;
        }
    }
    .fill-info {
      padding: 30px;
      border-top: 1px dashed #e1e1e1;
      overflow: hidden;
      .label {
        display: inline-block;
        width: 65px;
        color: #555;
      }
      & > div,
      input {
        display: inline-block;
        width: 180px;
        & + span {
            margin-left: 30px;
        }
        &:focus {
          box-shadow: 0 0 5px 0 rgb(246 135 9 / 50%);
        }
      }
      button{
        margin-left: 30px;
      }
    }
}
